<%@ Page Language="VB" AutoEventWireup="false" CodeFile="ilc.aspx.vb" Inherits="ilc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    '---Page accepts these querystring values:
    '   T: B (bar) or L (line). If no type is specified then L is assumed.
    '   DP: One or more data points.
    '   W: Width
    '   H: Height
    '   FG: Line Color
    '   BG: Background Color
    '   TH: Line thickness (line chart) or space between bars (bar chart)
    
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim sDPList As String = Request.QueryString("DP")
        Dim sDP() As String = sDPList.Split(",")
        
        Dim oChart As New JInLineChart
        If Request.QueryString("T") = "L" Then
            oChart.ChartType = JInLineChart.Type.Line
        ElseIf Request.QueryString("T") = "B" Then
            oChart.ChartType = JInLineChart.Type.Bar
        End If
        
        oChart.Data = sDP
        oChart.Width = Request.QueryString("W")
        oChart.Height = Request.QueryString("H")
        oChart.LineHeight = Request.QueryString("TH")
        oChart.ForegroundColor = Request.QueryString("FG")
        oChart.BackgroundColor = Request.QueryString("BG")
        
        oChart.ShowChart()
    End Sub
</script>
